<template>
  <div :class="{ 'cq-header': isIndex }"></div>
</template>

<script>
export default {
  name: 'CqHeader',
  data() {
    return {
      navList: [
        {
          url: '/index',
          linkName: '首页'
        },
        {
          url: '#',
          linkName: '橙品牌',
          children: [
            {
              url: '/news',
              linkName: '新闻资讯'
            },
            {
              url: '/apply',
              linkName: '入驻申请'
            }
          ]
        },
        {
          url: '/news',
          linkName: '新闻资讯'
        },
        {
          url: '/apply',
          linkName: '入驻申请'
        },
        {
          url: '/case',
          linkName: '行业案例'
        },
        {
          url: '/about',
          linkName: '关于我们'
        }
      ]
    }
  },
  computed: {
    // 是否是首页
    isIndex() {
      return this.$route.path === '/index'
    }
  }
}
</script>

<style lang="scss" scoped>
.cq-header {
  position: fixed;
  z-index: 999;
  width: 100%;
  top: 0;
  left: 0;
  .cq-head-logo {
    h1 {
      a {
        display: inline-block;
        width: 92px;
        height: 36px;
        background: url('@/assets/img/logo-rev.png') no-repeat center/cover;
      }
    }
  }
}

.cq-header-white {
  h1 {
    a {
      display: inline-block;
      width: 92px;
      height: 36px;
      background: url('@/assets/img/logo.png');
    }
  }
  .cq-head-nav {
    a:hover {
      color: #666;
      text-decoration: none;
    }
  }
}

.cq-head-wrap {
  height: 36px;
  padding: 22px 0;
}

.cq-head-nav {
  a {
    color: #c8c8c8;
    font-size: 16px;
    line-height: 36px;
    margin-right: 46px;
    &.router-link-active {
      color: #fff;
    }
    &:hover {
      color: #fff;
      text-decoration: none;
    }
  }
}

.pull-list {
  position: relative;
  &:hover {
    .pull-list-item {
      visibility: visible;
      max-height: 500px;
    }
    .icon-arrow-down::after {
      transform: rotate(180deg);
    }
  }
}

.pull-list-item {
  overflow: hidden;
  position: absolute;
  top: 58px;
  left: -30px;
  visibility: hidden;
  max-height: 0;
  width: 124px;
  line-height: 44px;
  background-color: black;
  text-align: center;
  transition: 0.3s;
  border-radius: 4xp;
  a {
    margin: 0;
    color: #fff;
    &:hover {
      color: #ff7200;
    }
  }
}
</style>
